(define (domain routing-gpln)
  (:requirements :strips :typing)

  (:types Truck Node Digit)
  
  (:predicates (ats ?t - Truck ?y - Node)
   (Truck ?t - Truck)
   (Connected ?n1 ?n2 - Node ?d - Digit)
   (Delivered ?n - Node)
   (Dist ?t - Truck ?n - Node)
   (Decr ?d1 ?d2 - Digit)
   (Visited ?n - Node)
   )

  (:action move
    :parameters (?t - Truck ?n1 ?n2 - Node ?d - Digit)
    :precondition (and(ats ?t ?n1)(Truck ?t)(Connected ?n1 ?n2 ?d)(Dist ?t @D0)(not(Visited ?n2)))
    :effect (and(ats ?t ?n2)(not(ats ?t ?n1))(Dist ?t ?d)(not(Dist ?t @D0))(Visited ?n2))
    )
	
	(:action deliver
	:parameters (?t - Truck ?n - Node)
	:precondition (and(ats ?t ?n)(Dist ?t @D0))
	:effect (Delivered ?n)
	)
	
	(:action travel
	:parameters (?t - Truck ?d1 ?d2 - Digit)
	:precondition (and(Dist ?t ?d1)(Decr ?d1 ?d2))
	:effect (and(Dist ?t ?d2)(not(Dist ?t ?d1)))
	)

)